package com.example.barcodeapp.persenter;

import com.example.barcodeapp.base.BasePersenter;
import com.example.barcodeapp.common.CommonSubscriber;
import com.example.barcodeapp.interfaces.own.IOwn;
import com.example.barcodeapp.model.HttpManager;
import com.example.barcodeapp.ui.own.bean.HuoDongBean;
import com.example.barcodeapp.ui.wode.bean.JiFengBiJiLuBean;
import com.example.barcodeapp.ui.wode.bean.JifengBiChongZhiJinEBean;
import com.example.barcodeapp.ui.wode.bean.JifengbichongzhishuomingBean;
import com.example.barcodeapp.utils.RxUtils;

public class OnePresenterJiFengBiChongZhi extends BasePersenter<IOwn.Viewjifengbichongzhi> implements IOwn.Persenterjifengbichongzhi {


    @Override
    public void getjifengbichoznghi() {
        addSubscribe(HttpManager.getInstance().getOwnTpApi().getwodejifengbikaunxiang()
                .compose(RxUtils.rxScheduler())
                .subscribeWith(new CommonSubscriber<JifengBiChongZhiJinEBean>(mView) {
                    @Override
                    public void onNext(JifengBiChongZhiJinEBean hanFuDaBean) {
                        mView.getjifengbichongzhi(hanFuDaBean);
                    }
                }));
    }

    @Override
    public void getjifengbichoznghishuoming() {
        addSubscribe(HttpManager.getInstance().getOwnTpApi().getwodejifengbishuoming()
                .compose(RxUtils.rxScheduler())
                .subscribeWith(new CommonSubscriber<JifengbichongzhishuomingBean>(mView) {
                    @Override
                    public void onNext(JifengbichongzhishuomingBean hanFuDaBean) {
                        mView.getjifengbichoznghishuoming(hanFuDaBean);
                    }
                }));
    }
}
